package com.java.tutorials.designpattern.behavioral.memento.employee;
public class Employee{
  private int mId = 0;
  private String mFirstName = "";
  private String mLastName = "";
  private int mSalary = 0;
  public int getId(){
    return mId;
  }
  public void setId(int pId){
    mId = pId;
  }
  public String getFirstName(){
    return mFirstName;
  }
  public void setFirstName(String pFirstName){
    mFirstName = pFirstName;
  }
  public String getLastName(){
    return mLastName;
  }
  public void setLastName(String pLastName){
    mLastName = pLastName;
  }
  public int getSalary(){
    return mSalary;
  }
  public void setSalary(int pSalary){
    mSalary = pSalary;
  }
  //���ɱ�����״̬��memento����
  public EmployeeMemento getMemento(){
    return new  EmployeeMemento(mId, mFirstName, mLastName, mSalary);
  }
  //��memento�����״̬���ظ�����
  public void setMemento(EmployeeMemento m){
    mId = m.mId;
    mFirstName = m.mFirstName;
    mLastName = m.mLastName;
    mSalary = m.mSalary;
  }
}
